package com.woniu.springbootrbac.service.impl;

import com.woniu.springbootrbac.vo.UserAo;
import com.woniu.springbootrbac.entity.SysUser;
import com.woniu.springbootrbac.dto.UserDto;
import com.woniu.springbootrbac.mapper.SysUserMapper;
import com.woniu.springbootrbac.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private SysUserMapper mapper;
    @Override
    public int deleteByPrimaryKey(Long id) {
        return mapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(SysUser record) {
        return mapper.insert(record);
    }

    @Override
    public int insertSelective(SysUser record) {
        return mapper.insertSelective(record);
    }

    @Override
    public SysUser selectByPrimaryKey(Long id) {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public SysUser login(UserDto dto) {
        return mapper.login(dto);
    }

    @Override
    public int updateByPrimaryKeySelective(SysUser record) {
        return mapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(SysUser record) {
        return mapper.updateByPrimaryKey(record);
    }

    @Override
    public List<UserAo> selByLike(UserDto dto) {
        return mapper.selByLike(dto);
    }

    @Override
    public SysUser selectByTel(String tel) {
        return mapper.selectByTel(tel);
    }
}
